#! /usr/bin/env python3
# -*- encoding:utf-8 -*-

import helper.config_default as config_default


def merge(old, new):
    r = {}
    for k, v in old.items():
        if k in new:
            if isinstance(v, dict):
                r[k] = merge(v, new[k])
            else:
                r[k] = new[k]
        else:
            r[k] = v
    return r


configs = config_default.configs


try:
    import config_override
    configs = merge(configs, config_override.cnnfigs)
    print(configs)
except ImportError as e:
    pass
